<% if @unpublish_all_data.exists? %>
  <h3 class="crayons-subtitle-2 mb-5"><%= t("views.admin.users.unpublish_logs.subtitle_html", user: link_to(@unpublish_all_data.audit_log.user.username, @unpublish_all_data.audit_log.user.path), time: l(@unpublish_all_data.audit_log.created_at, format: :admin_user)) %></h3>
  <div class="crayons-card p-6 mb-5">
    <h4 class="mb-2"><%= t("views.admin.users.unpublish_logs.posts") %></h4>
    <% @unpublish_all_data.target_articles.each do |article| %>
      <div class="mb-1">
        <%= link_to article.title, article.current_state_path %>
        <a href="<%= article.path %>/edit" target="_blank" rel="noopener" class="c-link"><%= t("views.admin.users.unpublish_logs.edit") %></a>
        <% if article.published %>
          <span class="color-base-60"><%= t("views.admin.users.unpublish_logs.republished") %></span>
        <% end %>
      </div>
    <% end %>
  </div>
  <div class="crayons-card p-6">
    <h4 class="mb-2"><%= t("views.admin.users.unpublish_logs.comments") %></h4>
    <% @unpublish_all_data.target_comments.each do |comment| %>
      <div class="crayons-card p-3 mb-3">
        <div class="color-base-80">
          <%= truncate(strip_tags(comment.processed_html), length: 250).html_safe %>
        </div>
        <%= link_to t("views.admin.users.unpublish_logs.commentable"), comment.commentable.current_state_path %>
        <p class="fs-s">
          <%= t("views.admin.users.unpublish_logs.created", time: l(comment.created_at, format: :admin_user)) %>
        </p>
      </div>
    <% end %>
  </div>
<% end %>
